<template>
  <dv-digital-flop :config="config" style="height:100%;width:100%"/>
</template>
<script>
  export default {
    props: {
      info: {
        type: Object,
        default: function() {
          return {
            number: -10,
            text: "同比:",
            fontColor: "#3de7c9",
          };
        },
      },
      fontColor: {
        type: String,
        default: "#3de7c9",
      },
    },
    computed: {
      config: function() {
        return {
          number: [this.info.number],
          content:
              this.info.number > 0
                  ? `${this.info.text} :+{nt}%`
                  : `${this.info.text} :{nt}%`,
          style: {
            fontSize: 15,
            fill:
                this.info.number > 0 ? "rgba(235, 64, 76)" : "rgba(70, 178, 70)",
          },
        };
      },
    },
  };
</script>
<style>
.dv-digital-flop {

}
</style>
